/**
 * 
 */
package org.schrag.java.jbgl.framework;

import java.util.Date;

/**
 * A resource is a type of the resources used in the game. 
 * @author Florian Schrag
 */
public interface IResource extends IValue{
	/**
	 * @return Amount of this resource on all locations at the current time. 
	 */
	public double getAmountOnAllLocations();	
	/**
	 * @param location 
	 * @return Amount of this resource on specified locations at the current time.
	 */
	public double getAmountOn(ILocation location);
	/**
	 * @param time 
	 * @return Amount of this resource on all locations at the specified time.
	 */
	public double getAmountOnAllLocationsAt(Date time);
	/**
	 * @param location
	 * @param time
	 * @return Amount of this resource on specified location at specified time.
	 */
	public double getAmountOnAt(ILocation location, Date time);	
	/**
	 * @param amount
	 * @param location
	 * @return Time when the specified amount is reached.
	 */
	public Date getTimeAmountReachedOn(double amount, ILocation location);
	/**
	 * 
	 * @param amount
	 * @return Time when the specified amount is reached.
	 */
	public Date getTimeAmountReached( double amount);
	/**
	 * Gets the current Amount from the game.
	 */
	public void refresh();
	/**
	 * @param amount
	 * @param location
	 * @return The Amount after the increase.
	 */
	public double increaseAmountOn( double amount, ILocation location);
	/**
	 * @param location
	 */
	public void setMaxOn( ILocation location);
	/**
	 * @return <b>true</b> if a maximum is set.
	 */
	public boolean hasMax();
	/**
	 * @param tick
	 */
	public void setTick(ITick tick);
}